package com.song.dao;

import com.song.pojo.User;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @author TonySong
 * @date 2024/4/23 0023
 * @time 14:49
 */
public interface UserDao extends JpaRepository<User,Long> {
    //如果我需要自己的定制sql:无需首先sql语句
    //约定由于配置
    Long countByUsername(String username);
    //select * from t_user where username=? and password=?
    User getUserByUsernameAndPassword(String username,String password);

}
